/** Windows Utilities
 
Authors:
	Wei Li (oldrev@gmail.com)

Copyright: 
	Copyright (C) 2007 Wei Li. All rights reserved.

License:
	BSD
	
*/

module dotmars.platform.windows.util;

import dotmars.platform.windows.types;

long largeIntegerToLong(LARGE_INTEGER li)
{
	long l = li.QuadPart;
	return l;
}

LARGE_INTEGER longToLargeInteger(long l)
{
	LARGE_INTEGER li = void;
	li.QuadPart = l;
	return li;
}

long fileTimeToLong(FILETIME ft)
{
	LARGE_INTEGER li = void;
	li.u.LowPart = ft.dwLowDateTime;
	li.u.HighPart = ft.dwHighDateTime;
	return li.QuadPart;
}

FILETIME longToFileTime(long l)
{
	LARGE_INTEGER li = void;
	li.QuadPart = l;
	FILETIME ft = void;
	ft.dwLowDateTime = li.u.LowPart;
	ft.dwHighDateTime = li.u.HighPart;
	return ft;	
}

